import QtQuick
import QtQuick.Layouts
import QtCharts

Rectangle {
    Layout.fillWidth: true
    Layout.fillHeight: true

    ChartView {
        id: chartView
        title: "对数坐标轴示例"
        titleFont.bold: true
        titleFont.pointSize: 14

        anchors.fill: parent
        antialiasing: true

        LogValueAxis {
            id: valueAxisX
            min: 1
            max: 100
            base: 10
            labelFormat: "%.0f"
            titleText: "X Title"
        }

        LogValueAxis {
            id: valueAxisY
            min: 1
            max: 10000
            base: 10
            labelFormat: "%.0f"
            titleText: "Y Title"
        }

        LineSeries {
            name: "line"
            XYPoint { x: 1; y: 1 }
            XYPoint { x: 10; y: 100 }
            XYPoint { x: 100; y: 10000 }
            axisX: valueAxisX
            axisY: valueAxisY
        }
    }
}
